﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="ConsultarClientePagamento.aspx.cs" Inherits="AcademiaInteligenteWeb.ConsultarClientePagamento" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1>Consultar Clientes
    </h1>
    <div id="formulario">
        <table>
            <tr>
                <td>
                    <label>
                        <input type="radio" name="pagamentos" <%if (Request["pagamentos"] == "" || Request["pagamentos"] == "1")
                                                                { %>checked<%} %>
                            value="1" />Todos
                    </label>
                </td>
                <td>
                    <label>
                        <input type="radio" name="pagamentos" value="2" <%if (Request["pagamentos"] == "2")
                                                                          {%>checked<%}%> />Devendo
                    </label>
                </td>
                <td>
                    <label>
                        <input type="radio" name="pagamentos" value="3" <%if (Request["pagamentos"] == "3")
                                                                          {%>checked<%}%> />OK
                    </label>
                </td>

                <td colspan="4" style="text-align: right;">
                    <asp:Button ID="btnConsultar" Text="Consultar" runat="server" OnClick="btnConsultar_Click" />
                </td>

            </tr>
        </table>
    </div>
    <div id="dados">
        <asp:GridView ID="grdClientes" runat="server" AutoGenerateColumns="false" AllowPaging="true" OnRowDataBound="grdClientes_RowDataBound">
            <AlternatingRowStyle CssClass="alterningRow" />
            <SelectedRowStyle CssClass="selectedRow" />
            <Columns>
                <asp:BoundField DataField="Nome" HeaderText="Nome" />
                <asp:BoundField DataField="Login" HeaderText="Login" HeaderStyle-Width="160px" />
                <asp:BoundField DataField="Bairro" HeaderText="Bairro" HeaderStyle-Width="160px" />
                <asp:TemplateField HeaderText="Pagamentos Efetuados">
                    <ItemTemplate>
                        <asp:GridView ID="grdClientes" runat="server" DataSource='<%#Eval("ClientePagamento")%>' AutoGenerateColumns="false" AllowPaging="true">
                            <Columns>
                                <asp:BoundField DataField="data_vencimento" HeaderText="data_vencimento" DataFormatString="{0:dd/MM/yyyy}" />
                                <asp:BoundField DataField="data_pagamento" HeaderText="data_pagamento" DataFormatString="{0:dd/MM/yyyy}" />
                                <asp:BoundField DataField="valor" HeaderText="Valor Pago com Desconto" HeaderStyle-Width="70px" />
                            </Columns>
                        </asp:GridView>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Pagamentos Pendentes">
                    <ItemTemplate>
                        <asp:Label Text="" ID="lblPagamentosPendtes" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>


</asp:Content>
